These are part of the collections module and act very similar to regular tuples
The main difference being that values stored in a named tuple can be accessed using field names instead of indexes.
For example, a point in the two-dimensional plane can be represented using two coordinates. In a regular tuple, these values would be accessed by index ([0] and [1]), but if we define a named tuple, Point, we can access them using x and y instead (although we can still use indexes, too, if we want):
Example:
from collections import namedtuple
# Regular tuple p = (2, 4) # p[0] = 2, p[1] = 4
# Named tuple Point = namedtuple('Point', 'x y') q = Point(3, 5) # q.x = 3, q.y = 5
These are part of the collections module and act very similar to regular tuples
The main difference being that values stored in a named tuple can be accessed using field names instead of indexes.
For example, a point in the two-dimensional plane can be represented using two coordinates. In a regular tuple, these values would be accessed by index ([0] and [1]), but if we define a named tuple, Point, we can access them using x and y instead (although we can still use indexes, too, if we want):
Example:
from collections import namedtuple
# Regular tuple p = (2, 4) # p[0] = 2, p[1] = 4
# Named tuple Point = namedtuple('Point', 'x y') q = Point(3, 5) # q.x = 3, q.y = 5
I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.
Why Telegram?
Telegram has no known backdoors and, even though it is come in for criticism for using proprietary encryption methods instead of open-source ones, those have yet to be compromised. While no messaging app can guarantee a 100% impermeable defense against determined attackers, Telegram is vulnerabilities are few and either theoretical or based on spoof files fooling users into actively enabling an attack.